package com.lianxi;

import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;

public class Map_Hashtable {
    public static void main(String[] args) {
        Map map = new Hashtable();
        map.put(null, "aaa");//不能有空值和空键 运行时报错
        map.put("b", null);
        System.out.println(map.size());
        Collection col = map.values();
        Iterator iterator = col.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
